Misc language cleanups.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 5 Dec 2002 18:45:35 +0000 (18:45 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 5 Dec 2002 18:45:35 +0000 (18:45 +0000)
gpsbabel/defs.h
gpsbabel/gpx.c
gpsbabel/jeeps/gpssend.c
gpsbabel/jeeps/gpsserial.c
gpsbabel/jeeps/gpsserial.h
gpsbabel/jeeps/gpsutil.h
gpsbabel/main.c
gpsbabel/mapsend.h
gpsbabel/mkshort.c
gpsbabel/util.c
gpsbabel/vecs.c

index 6fa85c6ef7ed0c2f61759bdbd4ad011dc610000d..fbc728b29938adebda44d186aec89f99e636691b 100644 (file)
@@ -157,7 +157,7 @@ typedef void (*route_trl)(const route_head *);
 void waypt_add (waypoint *);
 void waypt_del (waypoint *);
 void waypt_disp_all(waypt_cb);
-void route(route_hdr, route_trl, waypt_cb);
+void route_disp_all(route_hdr, route_trl, waypt_cb);
 unsigned int waypt_count(void);
 
 route_head *route_head_alloc(void);
@@ -190,12 +190,13 @@ void fatal(const char *, ...)
        ;
 ff_vecs_t *find_vec(char *, char **);
 void disp_vecs(void);
+void disp_formats(void);
 void printposn(const coord *c, int is_lat);
 
 void *xcalloc(size_t nmemb, size_t size);
 void *xmalloc(size_t size);
-char * xstrdup(const char *s);
-
+char *xstrdup(const char *s);
+void *rtrim(char *s);
 
 /*
  * PalmOS records like fixed-point numbers, which should be rounded
index fffdf0523f607445298b68d7fa854db174aada5c..8a29a826ea60e84ca4e78f27edd020694d63bb31 100644 (file)
@@ -353,7 +353,7 @@ gpx_waypt_pr(const waypoint *waypointp)
 }
 
 static void
-gpx_track_hdr(route_head *rte)
+gpx_track_hdr(const route_head *rte)
 {
        fprintf(ofd, "<trk>\n");
        if (rte->rte_name) {
@@ -381,7 +381,7 @@ gpx_track_disp(const waypoint *waypointp)
 }
 
 static void
-gpx_track_tlr(route_hdr *rte)
+gpx_track_tlr(const route_head *rte)
 {
        fprintf(ofd, "</trkseg>\n");
        fprintf(ofd, "</trk>\n");
index c33149d7e9f5338dfab5a3a5903f3d8ac4cddb3a..59370b5c158b2496a122b6cc9da0f18fd5486358 100644 (file)
@@ -117,7 +117,7 @@ int32 GPS_Write_Packet(int32 fd, GPS_PPacket packet)
 
     GPS_Diag("\nTx Data:");
     Diag(&packet->dle, 3);    
-    if((ret=GPS_Serial_Write(fd,(const void *)&packet->dle,(size_t)3)) == -1)
+    if((ret=GPS_Serial_Write(fd,(const void *) &packet->dle,(size_t)3)) == -1)
     {
        perror("write");
        GPS_Error("SEND: Write to GPS failed");
index b3f8e37bb128dbd3df8a54f38991388fd4015496..546344571a3490299319a0e5a453113bbca82ab1 100644 (file)
@@ -116,7 +116,7 @@ int32 GPS_Serial_Flush(int32 fd)
        return 1;
 }
 
-int32 GPS_Serial_Write(int ignored, void *obuf, int size)
+int32 GPS_Serial_Write(int32 ignored, const void *obuf, int size)
 {
        DWORD len;
        WriteFile (comport, obuf, size, &len, NULL);
@@ -126,7 +126,7 @@ int32 GPS_Serial_Write(int ignored, void *obuf, int size)
        return len;
 }
 
-int GPS_Serial_Read(int ignored, void *ibuf, int size)
+int GPS_Serial_Read(int32 ignored, void *ibuf, int size)
 {
        DWORD cnt;
 
@@ -272,7 +272,7 @@ int32 GPS_Serial_Read(int32 handle, void *ibuf, int size)
                return read(handle, ibuf, size);
 }
 
-int32 GPS_Serial_Write(int32 handle, void *obuf, int size)
+int32 GPS_Serial_Write(int32 handle, const void *obuf, int size)
 {
                return write(handle, obuf, size);
 }
index b1f3701855789d65eabf3591a59422489d268893..1849cd01c812eee239512bb04553282d58e0bf0e 100644 (file)
@@ -21,7 +21,9 @@ int32  GPS_Serial_On(const char *port, int32 *fd);
 int32  GPS_Serial_Off(const char *port, int32 fd);
 int32  GPS_Serial_Wait(int32 fd);
 int32  GPS_Serial_Flush(int32 fd);
-int32 GPS_Serial_On_NMEA(const char *port, int32 *fd);
+int32  GPS_Serial_On_NMEA(const char *port, int32 *fd);
+int32  GPS_Serial_Read(int32 ignored, void *ibuf, int size);
+int32  GPS_Serial_Write(int32 ignored, const void *obuf, int size);
 
 
 #endif
index 2458242081a79a35d20de12c3d6f4a698a82576f..30027885c45a8c7d25dc2c28e4427d84d51df1dc 100644 (file)
@@ -35,6 +35,8 @@ void   GPS_User(char *s);
 void   GPS_Disable_User(void);
 void   GPS_Enable_User(void);
 void   GPS_Diagnose(int32 c);
+void   GPS_Diag(const char *fmt, ...);
+
 void   GPS_Enable_Diagnose(void);
 void   GPS_Disable_Diagnose(void);
 
index 1f02afc11a95eb3046569bd7bf1e6673d4f38982..f31940525e4397a5af42ef9d56899900c2b73115 100644 (file)
@@ -19,6 +19,7 @@
 
 
 #include "defs.h"
+#include <ctype.h>
 
 global_options global_opts;
 
index 55ca4b5df1f8e32c0eaf63a8992ec69b358a5f0e..3c77b332004ce2dad6dcb7186c23a41432dffe23 100644 (file)
@@ -40,5 +40,5 @@ typedef enum {
        ms_type_rgn = 0,
        ms_type_wpt = 1,
        ms_type_track = 2,
-       ms_type_log = 3,
+       ms_type_log = 3
 } ms_type;
index 8b29731d321a27b0f2e640e287029f2d1298f754..a551750d4bf13aa1ce1a4ca364401cf27f653c8c 100644 (file)
@@ -196,7 +196,7 @@ mkshort(const char *istring)
         * Now brutally truncate the resulting string, preserve trailing 
         * numeric data.
         */
-       if ((i = strlen(ostring)) > target_len) {
+       if ((/*i = */strlen(ostring)) > target_len) {
                strcpy(&ostring[target_len] - strlen(np), np);
        }
        return ostring;
index 2a581c74fc6957d7301e9c3de7280995a12d6488..a56a1954c679409cea37e098433227982c27d03b 100644 (file)
@@ -22,6 +22,7 @@
 #include "defs.h"
 #include <stdio.h>
 #include <stdlib.h>
+#include <ctype.h>
 
 void *
 xmalloc(size_t size)
index b01358257eb27344587ebb0a5fd61383f0bf2d9f..193f6f387358a41213c6132590c4a641e604f0ce 100644 (file)
@@ -64,7 +64,8 @@ vecs_t vec_list[] = {
        {
                &gpsman_vecs,
                "gpsman",
-               "GPSman"
+               "GPSman", 
+               NULL
        },
        {
                &gpx_vecs,
@@ -75,12 +76,14 @@ vecs_t vec_list[] = {
        {
                &mag_vecs,
                "magellan",
-               "Magellan protocol"
+               "Magellan protocol", 
+               NULL
        },
        {
                &mapsend_vecs,
                "mapsend",
-               "Magellan Mapsend"
+               "Magellan Mapsend", 
+               NULL
        },
        {
                &pcx_vecs,
@@ -98,22 +101,26 @@ vecs_t vec_list[] = {
        {
                &gpsutil_vecs,
                "gpsutil",
-               "gpsutil"
+               "gpsutil", 
+               NULL
        },
        {
                &tiger_vecs,
                "tiger",
-               "U.S. Census Bureau Tiger Mapping Service"
+               "U.S. Census Bureau Tiger Mapping Service", 
+               NULL
        },
        {
                &csv_vecs,
                "csv",
-               "Comma separated values"
+               "Comma separated values", 
+               NULL
        },
        {
                &xmap_vecs,
                "xmap",
-               "Delorme Topo USA4/XMap Conduit"
+               "Delorme Topo USA4/XMap Conduit", 
+               NULL
        },
        {
                &dna_vecs,
@@ -130,22 +137,26 @@ vecs_t vec_list[] = {
        {
                &cetus_vecs,
                "cetus",
-               "Cetus for Palm/OS"
+               "Cetus for Palm/OS", 
+               NULL
        },
        {
                &gpspilot_vecs,
                "gpspilot",
-               "GPSPilot Tracker for Palm/OS"
+               "GPSPilot Tracker for Palm/OS", 
+               NULL
        },
        {
                &magnav_vec,
                "magnav",
-               "Magellan NAV Companion for PalmOS"
+               "Magellan NAV Companion for PalmOS", 
+               NULL
        },
        {
                &garmin_vecs,
                "garmin",
-               "Garmin serial protocol"
+               "Garmin serial protocol", 
+               NULL
        },
        {
                &mxf_vecs,
@@ -180,10 +191,12 @@ vecs_t vec_list[] = {
        {
                &gpsdrive_vecs,
                "gpsdrive",
-               "GpsDrive Format"
+               "GpsDrive Format", 
+               NULL
        },
 
         {
+               NULL,
                NULL,
                NULL,
                NULL